-
Notifications
You must be signed in to change notification settings - Fork 1
/
flows.json
1 lines (1 loc) · 47.2 KB
/
flows.json
1
[{"id":"3fa48755.3250d8","type":"tab","label":"Machine Learning","disabled":false,"info":"A typical Node-RED Flow which will deal with the following:\n1) Taking User Inputs For Prediction\n2) Acquiring Access to Machine Learning Service\n3) Gaining Access to Deployed Machine Learning Model\n4) Supplying the Inputs to the Model and Receiving an Output\n5) Displaying the Output (Life Expectancy), notifying, and representing it visually.\n\n"},{"id":"e3b71738.9e8a8","type":"tab","label":"AutoAI","disabled":true,"info":"A typical Node-RED Flow which will deal with the following:\n1) Taking User Inputs For Prediction\n2) Acquiring Access to Machine Learning Service\n3) Gaining Access to Deployed AutoAI Model\n4) Supplying the Inputs to the Model and Receiving an Output\n5) Displaying the Output (Life Expectancy), notifying, and representing it visually."},{"id":"6918c602.df679","type":"ui_group","z":"","name":"Inputs For Prediction","tab":"f2b038b4.b14208","order":2,"disp":true,"width":9,"collapse":false},{"id":"f2b038b4.b14208","type":"ui_tab","z":"","name":"Life Expectancy Prediction With AutoAI","icon":"fa-magic","disabled":false,"hidden":false},{"id":"e5a26237.bf3fa8","type":"ui_base","theme":{"name":"theme-custom","lightTheme":{"default":"#0094CE","baseColor":"#0000ff","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Life Expectancy Theme-Dark-Blue","default":"#4B7930","baseColor":"#397ec4","baseFont":"Times New Roman,Times,serif","reset":false},"themeState":{"base-color":{"default":"#3e78bf","value":"#397ec4","edited":true},"page-titlebar-backgroundColor":{"value":"#2e5acf","edited":true},"page-backgroundColor":{"value":"#fafafa","edited":true},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":true},"group-textColor":{"value":"#3572d7","edited":true},"group-borderColor":{"value":"#000000","edited":true},"group-backgroundColor":{"value":"#ffffff","edited":true},"widget-textColor":{"value":"#111111","edited":true},"widget-backgroundColor":{"value":"#2851ca","edited":true},"widget-borderColor":{"value":"#ffffff","edited":true},"base-font":{"value":"Times New Roman,Times,serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Life Expectancy Prediction App","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"d9e9215.c929ee","type":"ui_tab","z":"","name":"Life Expectancy Prediction With Machine Learning","icon":"fa-superpowers","disabled":false,"hidden":false},{"id":"d775397c.ed44c","type":"ui_group","z":"","name":"Output Prediction","tab":"d9e9215.c929ee","order":3,"disp":true,"width":9,"collapse":false},{"id":"3054d804.999be8","type":"ui_group","z":"","name":"Output Prediction","tab":"f2b038b4.b14208","order":3,"disp":true,"width":9,"collapse":false},{"id":"1b8be63e.23b25a","type":"ui_group","z":"","name":"Inputs for Prediction","tab":"d9e9215.c929ee","order":2,"disp":true,"width":9,"collapse":false},{"id":"b68e5a82.ea3708","type":"ui_group","z":"","name":"Information About The App","tab":"d9e9215.c929ee","order":1,"disp":true,"width":"9","collapse":false},{"id":"656c360.d2735cc","type":"ui_group","z":"","name":"Information About The App","tab":"f2b038b4.b14208","order":1,"disp":true,"width":"9","collapse":false},{"id":"822e133a.645d","type":"ui_dropdown","z":"3fa48755.3250d8","name":"Status","label":"","tooltip":"","place":"Select Status","group":"1b8be63e.23b25a","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Developed","value":0,"type":"num"},{"label":"Developing","value":1,"type":"num"}],"payload":"","topic":"","x":90,"y":160,"wires":[["476a5729.f651d"]],"info":"This user input states whether the Country Status is Developing/Developed."},{"id":"b31462c4.11e22","type":"function","z":"3fa48755.3250d8","name":"pre-token","func":"global.set(\"year\",msg.payload.year);\nglobal.set(\"adm\",msg.payload.adm);\nglobal.set(\"infd\",msg.payload.infd);\nglobal.set(\"alcohol\",msg.payload.alcohol);\nglobal.set(\"perexp\",msg.payload.perexp);\nglobal.set(\"totalexp\",msg.payload.totalexp);\nglobal.set(\"hepb\",msg.payload.hepb);\nglobal.set(\"meas\",msg.payload.meas);\nglobal.set(\"bmi\",msg.payload.bmi);\nglobal.set(\"undfive\",msg.payload.undfive);\nglobal.set(\"polio\",msg.payload.polio);\nglobal.set(\"dipth\",msg.payload.dipth);\nglobal.set(\"hiv\",msg.payload.hiv);\nglobal.set(\"gdp\",msg.payload.gdp);\nglobal.set(\"thin119\",msg.payload.thin119);\nglobal.set(\"thin59\",msg.payload.thin59);\nglobal.set(\"compres\",msg.payload.compres);\nglobal.set(\"schooling\",msg.payload.schooling);\n\nvar apikey=\"***********************************\";\nmsg.headers={\"Content-Type\": \"application/x-www-form-urlencoded\"};\nmsg.payload={\"grant_type\":\"urn:ibm:params:oauth:grant-type:apikey\",\"apikey\":apikey};\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":140,"wires":[["8c5ac2d7.c9262","bd87ade9.6270b8"]],"info":"A function for making the inputs from the Form as global variables and specifying API Key to access the Machine Learning Service."},{"id":"8c5ac2d7.c9262","type":"http request","z":"3fa48755.3250d8","name":"","method":"POST","ret":"obj","paytoqs":false,"url":"https://iam.cloud.ibm.com/identity/token","tls":"","persist":false,"proxy":"","authType":"basic","x":170,"y":340,"wires":[["12945c72.fe2f04"]],"info":"An HTTP Request to connect to IBM Cloud and acquire an Identity/Access Token to access the Machine Learning Service."},{"id":"3a3a97f0.c2ed3","type":"http request","z":"3fa48755.3250d8","name":"","method":"POST","ret":"obj","paytoqs":false,"url":"https://eu-gb.ml.cloud.ibm.com/v3/wml_instances/203008ea-906b-48ac-aaed-86b2ffe65461/deployments/63601b6d-4864-459f-8d6e-beb8db75eda6/online","tls":"","persist":false,"proxy":"","authType":"","x":390,"y":340,"wires":[["e265009f.625908","ec7b7ceb.0c454"]],"info":"An HTTP Request that will access the Deployed Machine Learning Model, give a JSON input and gain an Output Prediction in JSON format."},{"id":"12945c72.fe2f04","type":"function","z":"3fa48755.3250d8","name":"pre-prediction","func":"var token=msg.payload.access_token;\nvar instance_id=\"203008ea-906b-48ac-aaed-86b2ffe65461\";\nmsg.headers=header = {\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer \"+token,\"ML-Instance-ID\":instance_id};\n\nvar country=global.get(\"country\");\nvar year=global.get(\"year\");\nvar status=global.get(\"status\");\nvar adm=global.get(\"adm\");\nvar infd=global.get(\"infd\");\nvar alcohol=global.get(\"alcohol\");\nvar perexp=global.get(\"perexp\");\nvar totalexp=global.get(\"totalexp\");\nvar hepb=global.get(\"hepb\");\nvar meas=global.get(\"meas\");\nvar bmi=global.get(\"bmi\");\nvar undfive=global.get(\"undfive\");\nvar polio=global.get(\"polio\");\nvar dipth=global.get(\"dipth\");\nvar hiv=global.get(\"hiv\");\nvar gdp=global.get(\"gdp\");\nvar thin119=global.get(\"thin119\");\nvar thin59=global.get(\"thin59\");\nvar compres=global.get(\"compres\");\nvar schooling=global.get(\"schooling\");\n\nmsg.payload={\n \"fields\":[\"Country\",\"Year\",\"Status\",\"Adult Mortality\",\"infant deaths\",\"Alcohol\",\"percentage expenditure\",\"Hepatitis B\",\"Measles \",\" BMI \",\"under-five deaths \",\"Polio\",\"Total expenditure\",\"Diphtheria \",\" HIV/AIDS\",\"GDP\",\" thinness 1-19 years\",\" thinness 5-9 years\",\"Income composition of resources\",\"Schooling\"],\n \"values\":[[country,year,status,adm,infd,alcohol,perexp,hepb,meas,bmi,undfive,polio,totalexp,dipth,hiv,gdp,thin119,thin59,compres,schooling]]\n};\nreturn msg;\n\n","outputs":1,"noerr":0,"x":240,"y":440,"wires":[["3a3a97f0.c2ed3"]],"info":"A function that will acquire access token and use Instance ID to access Machine Learning Model.\nThe function will also retrieve the global variables and prepare a JSON format which will be an input to the model."},{"id":"e265009f.625908","type":"function","z":"3fa48755.3250d8","name":"prediction","func":"msg.payload=\"Predicted Life Expectancy: \"+msg.payload.values[0][0]+ \" Years\";\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":260,"wires":[["1a2ba57f.f03a93","7964e9f5.7c91d","9cee8c40.0545f"]],"info":"A function to fetch the Predicted Life Expectancy from the received JSON output."},{"id":"1a2ba57f.f03a93","type":"debug","z":"3fa48755.3250d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":120,"wires":[],"info":"Displaying the Predicted Life Expectancy in Debug Console for cross-checking."},{"id":"c9e920bf.23909","type":"ui_dropdown","z":"3fa48755.3250d8","name":"Country","label":"","tooltip":"","place":"Select Country","group":"1b8be63e.23b25a","order":1,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Afghanistan","value":0,"type":"num"},{"label":"Albania","value":1,"type":"num"},{"label":"Algeria","value":2,"type":"num"},{"label":"Angola","value":3,"type":"num"},{"label":"Antigua and Barbuda","value":4,"type":"num"},{"label":"Argentina","value":5,"type":"num"},{"label":"Armenia","value":6,"type":"num"},{"label":"Australia","value":7,"type":"num"},{"label":"Austria","value":8,"type":"num"},{"label":"Azerbaijan","value":9,"type":"num"},{"label":"Bahamas","value":10,"type":"num"},{"label":"Bahrain","value":11,"type":"num"},{"label":"Bangladesh","value":12,"type":"num"},{"label":"Barbados","value":13,"type":"num"},{"label":"Belarus","value":14,"type":"num"},{"label":"Belgium","value":15,"type":"num"},{"label":"Belize","value":16,"type":"num"},{"label":"Benin","value":17,"type":"num"},{"label":"Bhutan","value":18,"type":"num"},{"label":"Bolivia (Plurinational State of)","value":19,"type":"num"},{"label":"Bosnia and Herzegovina","value":20,"type":"num"},{"label":"Botswana","value":21,"type":"num"},{"label":"Brazil","value":22,"type":"num"},{"label":"Brunei Darussalam","value":23,"type":"num"},{"label":"Bulgaria","value":24,"type":"num"},{"label":"Burkina Faso","value":25,"type":"num"},{"label":"Burundi","value":26,"type":"num"},{"label":"Côte d'Ivoire","value":27,"type":"num"},{"label":"Cabo Verde","value":28,"type":"num"},{"label":"Cambodia","value":29,"type":"num"},{"label":"Cameroon","value":30,"type":"num"},{"label":"Canada","value":31,"type":"num"},{"label":"Central African Republic","value":32,"type":"num"},{"label":"Chad","value":33,"type":"num"},{"label":"Chile","value":34,"type":"num"},{"label":"China","value":35,"type":"num"},{"label":"Colombia","value":36,"type":"num"},{"label":"Comoros","value":37,"type":"num"},{"label":"Congo","value":38,"type":"num"},{"label":"Cook Islands","value":"39","type":"str"},{"label":"Costa Rica","value":40,"type":"num"},{"label":"Croatia","value":41,"type":"num"},{"label":"Cuba","value":42,"type":"num"},{"label":"Cyprus","value":43,"type":"num"},{"label":"Czechia","value":44,"type":"num"},{"label":"Democratic People's Republic of Korea","value":45,"type":"num"},{"label":"Democratic Republic of the Congo","value":46,"type":"num"},{"label":"Denmark","value":47,"type":"num"},{"label":"Djibouti","value":48,"type":"num"},{"label":"Dominica","value":"49","type":"str"},{"label":"Dominican Republic","value":50,"type":"num"},{"label":"Ecuador","value":51,"type":"num"},{"label":"Egypt","value":52,"type":"num"},{"label":"El Salvador","value":53,"type":"num"},{"label":"Equatorial Guinea","value":54,"type":"num"},{"label":"Eritrea","value":55,"type":"num"},{"label":"Estonia","value":56,"type":"num"},{"label":"Ethiopia","value":57,"type":"num"},{"label":"Fiji","value":58,"type":"num"},{"label":"Finland","value":59,"type":"num"},{"label":"France","value":60,"type":"num"},{"label":"Gabon","value":61,"type":"num"},{"label":"Gambia","value":62,"type":"num"},{"label":"Georgia","value":63,"type":"num"},{"label":"Germany","value":64,"type":"num"},{"label":"Ghana","value":65,"type":"num"},{"label":"Greece","value":66,"type":"num"},{"label":"Grenada","value":67,"type":"num"},{"label":"Guatemala","value":68,"type":"num"},{"label":"Guinea","value":69,"type":"num"},{"label":"Guinea-Bissau","value":70,"type":"num"},{"label":"Guyana","value":71,"type":"num"},{"label":"Haiti","value":72,"type":"num"},{"label":"Holy See","value":193,"type":"num"},{"label":"Honduras","value":73,"type":"num"},{"label":"Hungary","value":74,"type":"num"},{"label":"Iceland","value":75,"type":"num"},{"label":"India","value":76,"type":"num"},{"label":"Indonesia","value":77,"type":"num"},{"label":"Iran (Islamic Republic of)","value":78,"type":"num"},{"label":"Iraq","value":79,"type":"num"},{"label":"Ireland","value":80,"type":"num"},{"label":"Israel","value":81,"type":"num"},{"label":"Italy","value":82,"type":"num"},{"label":"Jamaica","value":83,"type":"num"},{"label":"Japan","value":84,"type":"num"},{"label":"Jordan","value":85,"type":"num"},{"label":"Kazakhstan","value":86,"type":"num"},{"label":"Kenya","value":87,"type":"num"},{"label":"Kiribati","value":88,"type":"num"},{"label":"Kuwait","value":89,"type":"num"},{"label":"Kyrgyzstan","value":90,"type":"num"},{"label":"Lao People's Democratic Republic","value":91,"type":"num"},{"label":"Latvia","value":92,"type":"num"},{"label":"Lebanon","value":93,"type":"num"},{"label":"Lesotho ","value":94,"type":"num"},{"label":"Liberia","value":95,"type":"num"},{"label":"Libya","value":96,"type":"num"},{"label":"Lithuania","value":97,"type":"num"},{"label":"Luxembourg","value":98,"type":"num"},{"label":"Madagascar","value":99,"type":"num"},{"label":"Malawi","value":100,"type":"num"},{"label":"Malaysia","value":101,"type":"num"},{"label":"Maldives","value":102,"type":"num"},{"label":"Mali","value":103,"type":"num"},{"label":"Malta","value":104,"type":"num"},{"label":"Marshall Islands","value":105,"type":"num"},{"label":"Mauritania","value":106,"type":"num"},{"label":"Mauritius","value":107,"type":"num"},{"label":"Mexico","value":108,"type":"num"},{"label":"Micronesia (Federated States of)","value":109,"type":"num"},{"label":"Monaco","value":110,"type":"num"},{"label":"Mongolia","value":111,"type":"num"},{"label":"Montenegro ","value":112,"type":"num"},{"label":"Morocco","value":113,"type":"num"},{"label":"Mozambique","value":114,"type":"num"},{"label":"Myanmar","value":115,"type":"num"},{"label":"Namibia","value":116,"type":"num"},{"label":"Nauru","value":117,"type":"num"},{"label":"Nepal","value":118,"type":"num"},{"label":"Netherlands","value":119,"type":"num"},{"label":"New Zealand","value":120,"type":"num"},{"label":"Nicaragua","value":121,"type":"num"},{"label":"Niger","value":122,"type":"num"},{"label":"Nigeria","value":123,"type":"num"},{"label":"Niue","value":124,"type":"num"},{"label":"Norway","value":125,"type":"num"},{"label":"Oman","value":126,"type":"num"},{"label":"Pakistan","value":127,"type":"num"},{"label":"Palau","value":128,"type":"num"},{"label":"Panama","value":129,"type":"num"},{"label":"Papua New Guinea","value":130,"type":"num"},{"label":"Paraguay","value":131,"type":"num"},{"label":"Peru","value":132,"type":"num"},{"label":"Philippines","value":133,"type":"num"},{"label":"Poland","value":134,"type":"num"},{"label":"Portugal","value":135,"type":"num"},{"label":"Qatar","value":136,"type":"num"},{"label":"Republic of Korea","value":137,"type":"num"},{"label":"Republic of Moldova","value":138,"type":"num"},{"label":"Romania","value":139,"type":"num"},{"label":"Russian Federation","value":140,"type":"num"},{"label":"Rwanda","value":141,"type":"num"},{"label":"Saint Kitts and Nevis","value":142,"type":"num"},{"label":"Saint Lucia","value":143,"type":"num"},{"label":"Saint Vincent and the Grenadines","value":144,"type":"num"},{"label":"Samoa","value":145,"type":"num"},{"label":"San Marino","value":146,"type":"num"},{"label":"Sao Tome and Principe","value":147,"type":"num"},{"label":"Saudi Arabia","value":148,"type":"num"},{"label":"Senegal","value":149,"type":"num"},{"label":"Serbia","value":150,"type":"num"},{"label":"Seychelles","value":151,"type":"num"},{"label":"Sierra Leone","value":152,"type":"num"},{"label":"Singapore","value":153,"type":"num"},{"label":"Slovakia","value":154,"type":"num"},{"label":"Slovenia","value":155,"type":"num"},{"label":"Solomon Islands","value":156,"type":"num"},{"label":"Somalia","value":157,"type":"num"},{"label":"South Africa","value":158,"type":"num"},{"label":"South Sudan","value":159,"type":"num"},{"label":"Spain","value":160,"type":"num"},{"label":"Sri Lanka","value":161,"type":"num"},{"label":"State of Palestine","value":194,"type":"num"},{"label":"Sudan","value":162,"type":"num"},{"label":"Suriname","value":163,"type":"num"},{"label":"Swaziland","value":164,"type":"num"},{"label":"Sweden","value":165,"type":"num"},{"label":"Switzerland","value":166,"type":"num"},{"label":"Syrian Arab Republic","value":167,"type":"num"},{"label":"Tajikistan","value":168,"type":"num"},{"label":"Thailand","value":169,"type":"num"},{"label":"The former Yugoslav republic of Macedonia","value":170,"type":"num"},{"label":"Timor-Leste","value":171,"type":"num"},{"label":"Togo","value":172,"type":"num"},{"label":"Tonga","value":173,"type":"num"},{"label":"Trinidad and Tobago","value":174,"type":"num"},{"label":"Tunisia","value":175,"type":"num"},{"label":"Turkey","value":176,"type":"num"},{"label":"Turkmenistan","value":177,"type":"num"},{"label":"Tuvalu","value":178,"type":"num"},{"label":"Uganda","value":179,"type":"num"},{"label":"Ukraine","value":180,"type":"num"},{"label":"United Arab Emirates","value":181,"type":"num"},{"label":"United Kingdom of Great Britain and Northern Ireland","value":182,"type":"num"},{"label":"United Republic of Tanzania","value":183,"type":"num"},{"label":"United States of America","value":184,"type":"num"},{"label":"Uruguay","value":185,"type":"num"},{"label":"Uzbekistan","value":186,"type":"num"},{"label":"Vanuatu","value":187,"type":"num"},{"label":"Venezuela (Bolivarian Republic of)","value":188,"type":"num"},{"label":"Viet Nam","value":189,"type":"num"},{"label":"Yemen","value":190,"type":"num"},{"label":"Zambia","value":191,"type":"num"},{"label":"Zimbabwe","value":192,"type":"num"}],"payload":"","topic":"","x":100,"y":240,"wires":[["6f6eef3e.a9abd"]],"info":"This user input consists a list of 195 Countries till date."},{"id":"6f6eef3e.a9abd","type":"function","z":"3fa48755.3250d8","name":"select-country","func":"global.set(\"country\",msg.payload);","outputs":1,"noerr":0,"x":260,"y":200,"wires":[["b31462c4.11e22"]],"info":"A function for making Country input a global variable."},{"id":"476a5729.f651d","type":"function","z":"3fa48755.3250d8","name":"select-status","func":"global.set(\"status\",msg.payload);","outputs":1,"noerr":0,"x":230,"y":140,"wires":[["b31462c4.11e22"]],"info":"A function for making Country Status input a global variable."},{"id":"7964e9f5.7c91d","type":"ui_toast","z":"3fa48755.3250d8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"Predicted Value","x":680,"y":200,"wires":[[]],"info":"Notifying the user by providing the Predicted Life Expectancy Output."},{"id":"9cee8c40.0545f","type":"ui_text","z":"3fa48755.3250d8","group":"d775397c.ed44c","order":1,"width":0,"height":0,"name":"Predicted Value","label":"","format":"{{msg.payload}}","layout":"row-center","x":680,"y":260,"wires":[],"info":"Displaying the Predicted Life Expectancy in a Textbox so that it will be visible to the user."},{"id":"ec7b7ceb.0c454","type":"function","z":"3fa48755.3250d8","name":"guage-output","func":"msg.payload=msg.payload.values[0][0];\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":360,"wires":[["2fe766bf.7a3e6a"]],"info":"A function to represent the obtained output so that it can be represented visually."},{"id":"2fe766bf.7a3e6a","type":"ui_gauge","z":"3fa48755.3250d8","name":"Visual Representation","group":"d775397c.ed44c","order":2,"width":0,"height":0,"gtype":"gage","title":"","label":"Years","format":"","min":0,"max":"100","colors":["#ec0225","#fab854","#04cc27"],"seg1":"50","seg2":"75","x":640,"y":440,"wires":[],"info":"Visual Representation of Predicted Life Expectancy."},{"id":"cd86afcc.7c2c48","type":"ui_form","z":"3fa48755.3250d8","name":"Life Expectancy","label":"","group":"1b8be63e.23b25a","order":3,"width":0,"height":0,"options":[{"label":"Year","value":"year","type":"number","required":true,"rows":null},{"label":"Adult Mortality","value":"adm","type":"number","required":true,"rows":null},{"label":"Infant Deaths","value":"infd","type":"number","required":true,"rows":null},{"label":"Under-five deaths ","value":"undfive","type":"number","required":true,"rows":null},{"label":"Percentage Expenditure","value":"perexp","type":"number","required":true,"rows":null},{"label":"Total Expenditure","value":"totalexp","type":"number","required":true,"rows":null},{"label":"GDP","value":"gdp","type":"number","required":true,"rows":null},{"label":"Income composition of resources","value":"compres","type":"number","required":true,"rows":null},{"label":"Hepatitis B","value":"hepb","type":"number","required":true,"rows":null},{"label":"Measles ","value":"meas","type":"number","required":true,"rows":null},{"label":"Polio","value":"polio","type":"number","required":true,"rows":null},{"label":"Diphtheria ","value":"dipth","type":"number","required":true,"rows":null},{"label":"HIV/AIDS","value":"hiv","type":"number","required":true,"rows":null},{"label":"Alcohol","value":"alcohol","type":"number","required":true,"rows":null},{"label":"Thinness 5-9 years","value":"thin59","type":"number","required":true,"rows":null},{"label":"Thinness 1-19 years","value":"thin119","type":"number","required":true,"rows":null},{"label":"BMI ","value":"bmi","type":"number","required":true,"rows":null},{"label":"Schooling","value":"schooling","type":"number","required":true,"rows":null}],"formValue":{"year":"","adm":"","infd":"","undfive":"","perexp":"","totalexp":"","gdp":"","compres":"","hepb":"","meas":"","polio":"","dipth":"","hiv":"","alcohol":"","thin59":"","thin119":"","bmi":"","schooling":""},"payload":"","submit":"predict","cancel":"clear","topic":"","x":120,"y":80,"wires":[["b31462c4.11e22"]],"info":"This Form element includes the pre-requisite details for the Machine Learning Model to predict which will be inputted by user. The inputs to the model will be Immunization Factors, Economical Factors, Social Factors, Mortality Factors as follows:\n1) Year\n2) Adult Mortality Rates of both sexes (probability of dying between 15 and 60 years per 1000 population) \n3) Number of Infant Deaths per 1000 population\n4) Under-Five Deaths per 1000 population\n5) Percentage Expenditure on health as a percentage of Gross Domestic Product per capita(%) \n6) Total Expenditure\n7) Income Composition of Resources\n8) GDP\n9) Hepatitis B (HepB) immunization coverage among 1-year-olds (%)\n10) Measles - number of reported cases per 1000 population \n11) Polio\n12) Diphtheria\n13) HIV/AIDS\n14) BMI\n15) Alcohol recorded per capita (15+) consumption (in litres of pure alcohol)\n16) Thinness 1-19 years\n17) Thinness 5-9 years\n18) Schooling\n"},{"id":"bd87ade9.6270b8","type":"function","z":"3fa48755.3250d8","name":"inform-user","func":"msg.payload=\"Information Sent Successfully! Prediction will appear soon.\";\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":60,"wires":[["d5f9eab0.b6b86"]],"info":"A function to inform user about the input recorded."},{"id":"d5f9eab0.b6b86","type":"ui_toast","z":"3fa48755.3250d8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"Wait","x":690,"y":60,"wires":[[]],"info":"This will notify user that the information has been sent and prediction will be made shortly."},{"id":"ff49803b.78743","type":"ui_template","z":"3fa48755.3250d8","group":"b68e5a82.ea3708","name":"Information","order":1,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>\n<ul type=\"square\"><font size=\"4\">\n <li>Welcome to Life Expectancy Predictor App.</li>\n <li>You can fill in the Form and get the Predicted Life Expectancy of People living in a Country.</li>\n <li>You can also see a Visual Representation depending upon the Prediction after Form is submitted.</li>\n <ul type=\"circle\">\n <li>Red: Critical Life Expectancy.</li>\n <li>Orange: Moderate Life Expectancy.</li>\n <li>Green: Safe Life Expectancy.</li>\n </ul>\n</font></ul>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":310,"y":60,"wires":[[]],"info":"An information node for the user to know what the app does and how it can be used."},{"id":"f3122f1f.1d6cd","type":"function","z":"e3b71738.9e8a8","name":"pre-token","func":"global.set(\"year\",msg.payload.year);\nglobal.set(\"adm\",msg.payload.adm);\nglobal.set(\"infd\",msg.payload.infd);\nglobal.set(\"alcohol\",msg.payload.alcohol);\nglobal.set(\"perexp\",msg.payload.perexp);\nglobal.set(\"totalexp\",msg.payload.totalexp);\nglobal.set(\"hepb\",msg.payload.hepb);\nglobal.set(\"meas\",msg.payload.meas);\nglobal.set(\"bmi\",msg.payload.bmi);\nglobal.set(\"undfive\",msg.payload.undfive);\nglobal.set(\"polio\",msg.payload.polio);\nglobal.set(\"dipth\",msg.payload.dipth);\nglobal.set(\"hiv\",msg.payload.hiv);\nglobal.set(\"gdp\",msg.payload.gdp);\nglobal.set(\"population\",msg.payload.population);\nglobal.set(\"thin119\",msg.payload.thin119);\nglobal.set(\"thin59\",msg.payload.thin59);\nglobal.set(\"compres\",msg.payload.compres);\nglobal.set(\"schooling\",msg.payload.schooling);\n\nvar apikey=\"****************************************\";\nmsg.headers={\"Content-Type\": \"application/x-www-form-urlencoded\"};\nmsg.payload={\"grant_type\":\"urn:ibm:params:oauth:grant-type:apikey\",\"apikey\":apikey};\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":100,"wires":[["3b5f2831.c7662","70a50004.b26108"]],"info":"A function for making the inputs from the Form as global variables and specifying API Key to access the Machine Learning Service."},{"id":"3b5f2831.c7662","type":"http request","z":"e3b71738.9e8a8","name":"","method":"POST","ret":"obj","paytoqs":false,"url":"https://iam.cloud.ibm.com/identity/token","tls":"","persist":false,"proxy":"","authType":"basic","x":270,"y":320,"wires":[["b4ec63c0.e633a8"]],"info":"An HTTP Request to connect to IBM Cloud and acquire an Identity/Access Token to access the Machine Learning Service."},{"id":"d6353768.19a16","type":"http request","z":"e3b71738.9e8a8","name":"","method":"POST","ret":"obj","paytoqs":false,"url":"https://eu-gb.ml.cloud.ibm.com/v4/deployments/e7d07b72-e489-40e4-b5b1-aca29c0e7316/predictions","tls":"","persist":false,"proxy":"","authType":"","x":470,"y":280,"wires":[["102c1a86.efc99d","a2da686a.149118"]],"info":"An HTTP Request that will access the Deployed AutoAI Model, give a JSON input and gain an Output Prediction in JSON format."},{"id":"b4ec63c0.e633a8","type":"function","z":"e3b71738.9e8a8","name":"pre-prediction","func":"var token=msg.payload.access_token;\nvar instance_id=\"203008ea-906b-48ac-aaed-86b2ffe65461\";\nmsg.headers=header = {\"Content-Type\":\"application/json\",\"Authorization\":\"Bearer \"+token,\"ML-Instance-ID\":instance_id};\n\nvar country=global.get(\"country\");\nvar year=global.get(\"year\");\nvar status=global.get(\"status\");\nvar adm=global.get(\"adm\");\nvar infd=global.get(\"infd\");\nvar alcohol=global.get(\"alcohol\");\nvar perexp=global.get(\"perexp\");\nvar totalexp=global.get(\"totalexp\");\nvar hepb=global.get(\"hepb\");\nvar meas=global.get(\"meas\");\nvar bmi=global.get(\"bmi\");\nvar undfive=global.get(\"undfive\");\nvar polio=global.get(\"polio\");\nvar dipth=global.get(\"dipth\");\nvar hiv=global.get(\"hiv\");\nvar gdp=global.get(\"gdp\");\nvar population=global.get(\"population\");\nvar thin119=global.get(\"thin119\");\nvar thin59=global.get(\"thin59\");\nvar compres=global.get(\"compres\");\nvar schooling=global.get(\"schooling\");\n\nmsg.payload={\n \"input_data\":[{\n \"fields\":[\"Country\",\"Year\",\"Status\",\"Adult Mortality\",\"infant deaths\",\"Alcohol\",\"percentage expenditure\",\"Hepatitis B\",\"Measles \",\" BMI \",\"under-five deaths \",\"Polio\",\"Total expenditure\",\"Diphtheria \",\" HIV/AIDS\",\"GDP\",\"Population\",\" thinness 1-19 years\",\" thinness 5-9 years\",\"Income composition of resources\",\"Schooling\"],\n \"values\":[[country,year,status,adm,infd,alcohol,perexp,hepb,meas,bmi,undfive,polio,totalexp,dipth,hiv,gdp,population,thin119,thin59,compres,schooling]]\n }]\n};\nreturn msg;\n\n","outputs":1,"noerr":0,"x":320,"y":420,"wires":[["d6353768.19a16"]],"info":"A function that will acquire access token and use Instance ID to access AutoAI Model.\nThe function will also retrieve the global variables and prepare a JSON format which will be an input to the model."},{"id":"102c1a86.efc99d","type":"function","z":"e3b71738.9e8a8","name":"prediction","func":"//search result\nmsg.payload=\"Predicted Life Expectancy: \"+msg.payload.predictions[0].values[0][0]+ \" Years\";\nreturn msg;","outputs":1,"noerr":0,"x":500,"y":180,"wires":[["7baff578.ec454c","30476f32.481a28","7951f623.7b37a"]],"info":"A function to fetch the Predicted Life Expectancy from the received JSON output."},{"id":"7baff578.ec454c","type":"debug","z":"e3b71738.9e8a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":100,"wires":[],"info":"Displaying the Predicted Life Expectancy in Debug Console for cross-checking."},{"id":"30476f32.481a28","type":"ui_toast","z":"e3b71738.9e8a8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"Predicted Value","x":680,"y":180,"wires":[[]],"info":"Notifying the user by providing the Predicted Life Expectancy Output."},{"id":"7951f623.7b37a","type":"ui_text","z":"e3b71738.9e8a8","group":"3054d804.999be8","order":1,"width":0,"height":0,"name":"Predicted Value","label":"","format":"{{msg.payload}}","layout":"row-center","x":680,"y":240,"wires":[],"info":"Displaying the Predicted Life Expectancy in a Textbox so that it will be visible to the user."},{"id":"a2da686a.149118","type":"function","z":"e3b71738.9e8a8","name":"guage-output","func":"msg.payload=msg.payload.predictions[0].values[0][0];\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":340,"wires":[["4a04c40e.a3a884"]],"info":"A function to represent the obtained output so that it can be represented visually."},{"id":"8b64907b.4d2568","type":"ui_dropdown","z":"e3b71738.9e8a8","name":"Country","label":"","tooltip":"","place":"Select Country","group":"6918c602.df679","order":1,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Afghanistan","value":"Afghanistan","type":"str"},{"label":"Albania","value":"Albania","type":"str"},{"label":"Algeria","value":"Algeria","type":"str"},{"label":"Angola","value":"Angola","type":"str"},{"label":"Antigua and Barbuda","value":"Antigua and Barbuda","type":"str"},{"label":"Argentina","value":"Argentina","type":"str"},{"label":"Armenia","value":"Armenia","type":"str"},{"label":"Australia","value":"Australia","type":"str"},{"label":"Austria","value":"Austria","type":"str"},{"label":"Azerbaijan","value":"Azerbaijan","type":"str"},{"label":"Bahamas","value":"Bahamas","type":"str"},{"label":"Bahrain","value":"Bahrain","type":"str"},{"label":"Bangladesh","value":"Bangladesh","type":"str"},{"label":"Barbados","value":"Barbados","type":"str"},{"label":"Belarus","value":"Belarus","type":"str"},{"label":"Belgium","value":"Belgium","type":"str"},{"label":"Belize","value":"Belize","type":"str"},{"label":"Benin","value":"Benin","type":"str"},{"label":"Bhutan","value":"Bhutan","type":"str"},{"label":"Bolivia (Plurinational State of)","value":"Bolivia (Plurinational State of)","type":"str"},{"label":"Bosnia and Herzegovina","value":"Bosnia and Herzegovina","type":"str"},{"label":"Botswana","value":"Botswana","type":"str"},{"label":"Brazil","value":"Brazil","type":"str"},{"label":"Brunei Darussalam","value":"Brunei Darussalam","type":"str"},{"label":"Bulgaria","value":"Bulgaria","type":"str"},{"label":"Burkina Faso","value":"Burkina Faso","type":"str"},{"label":"Burundi","value":"Burundi","type":"str"},{"label":"Côte d'Ivoire","value":"Côte d'Ivoire","type":"str"},{"label":"Cabo Verde","value":"Cabo Verde","type":"str"},{"label":"Cambodia","value":"Cambodia","type":"str"},{"label":"Cameroon","value":"Cameroon","type":"str"},{"label":"Canada","value":"Canada","type":"str"},{"label":"Central African Republic","value":"Central African Republic","type":"str"},{"label":"Chad","value":"Chad","type":"str"},{"label":"Chile","value":"Chile","type":"str"},{"label":"China","value":"China","type":"str"},{"label":"Colombia","value":"Colombia","type":"str"},{"label":"Comoros","value":"Comoros","type":"str"},{"label":"Congo","value":"Congo","type":"str"},{"label":"Cook Islands","value":"Cook Islands","type":"str"},{"label":"Costa Rica","value":"Costa Rica","type":"str"},{"label":"Croatia","value":"Croatia","type":"str"},{"label":"Cuba","value":"Cuba","type":"str"},{"label":"Cyprus","value":"Cyprus","type":"str"},{"label":"Czechia","value":"Czechia","type":"str"},{"label":"Democratic People's Republic of Korea","value":"Democratic People's Republic of Korea","type":"str"},{"label":"Democratic Republic of the Congo","value":"Democratic Republic of the Congo","type":"str"},{"label":"Denmark","value":"Denmark","type":"str"},{"label":"Djibouti","value":"Djibouti","type":"str"},{"label":"Dominica","value":"Dominica","type":"str"},{"label":"Dominican Republic","value":"Dominican Republic","type":"str"},{"label":"Ecuador","value":"Ecuador","type":"str"},{"label":"Egypt","value":"Egypt","type":"str"},{"label":"El Salvador","value":"El Salvador","type":"str"},{"label":"Equatorial Guinea","value":"Equatorial Guinea","type":"str"},{"label":"Eritrea","value":"Eritrea","type":"str"},{"label":"Estonia","value":"Estonia","type":"str"},{"label":"Ethiopia","value":"Ethiopia","type":"str"},{"label":"Fiji","value":"Fiji","type":"str"},{"label":"Finland","value":"Finland","type":"str"},{"label":"France","value":"France","type":"str"},{"label":"Gabon","value":"Gabon","type":"str"},{"label":"Gambia","value":"Gambia","type":"str"},{"label":"Georgia","value":"Georgia","type":"str"},{"label":"Germany","value":"Germany","type":"str"},{"label":"Ghana","value":"Ghana","type":"str"},{"label":"Greece","value":"Greece","type":"str"},{"label":"Grenada","value":"Grenada","type":"str"},{"label":"Guatemala","value":"Guatemala","type":"str"},{"label":"Guinea","value":"Guinea","type":"str"},{"label":"Guinea-Bissau","value":"Guinea-Bissau","type":"str"},{"label":"Guyana","value":"Guyana","type":"str"},{"label":"Haiti","value":"Haiti","type":"str"},{"label":"Holy See","value":"Holy See","type":"str"},{"label":"Honduras","value":"Honduras","type":"str"},{"label":"Hungary","value":"Hungary","type":"str"},{"label":"Iceland","value":"Iceland","type":"str"},{"label":"India","value":"India","type":"str"},{"label":"Indonesia","value":"Indonesia","type":"str"},{"label":"Iran (Islamic Republic of)","value":"Iran (Islamic Republic of)","type":"str"},{"label":"Iraq","value":"Iraq","type":"str"},{"label":"Ireland","value":"Ireland","type":"str"},{"label":"Israel","value":"Israel","type":"str"},{"label":"Italy","value":"Italy","type":"str"},{"label":"Jamaica","value":"Jamaica","type":"str"},{"label":"Japan","value":"Japan","type":"str"},{"label":"Jordan","value":"Jordan","type":"str"},{"label":"Kazakhstan","value":"Kazakhstan","type":"str"},{"label":"Kenya","value":"Kenya","type":"str"},{"label":"Kiribati","value":"Kiribati","type":"str"},{"label":"Kuwait","value":"Kuwait","type":"str"},{"label":"Kyrgyzstan","value":"Kyrgyzstan","type":"str"},{"label":"Lao People's Democratic Republic","value":"Lao People's Democratic Republic","type":"str"},{"label":"Latvia","value":"Latvia","type":"str"},{"label":"Lebanon","value":"Lebanon","type":"str"},{"label":"Lesotho ","value":"Lesotho ","type":"str"},{"label":"Liberia","value":"Liberia","type":"str"},{"label":"Libya","value":"Libya","type":"str"},{"label":"Lithuania","value":"Lithuania","type":"str"},{"label":"Luxembourg","value":"Luxembourg","type":"str"},{"label":"Madagascar","value":"Madagascar","type":"str"},{"label":"Malawi","value":"Malawi","type":"str"},{"label":"Malaysia","value":"Malaysia","type":"str"},{"label":"Maldives","value":"Maldives","type":"str"},{"label":"Mali","value":"Mali","type":"str"},{"label":"Malta","value":"Malta","type":"str"},{"label":"Marshall Islands","value":"Marshall Islands","type":"str"},{"label":"Mauritania","value":"Mauritania","type":"str"},{"label":"Mauritius","value":"Mauritius","type":"str"},{"label":"Mexico","value":"Mexico","type":"str"},{"label":"Micronesia (Federated States of)","value":"Micronesia (Federated States of)","type":"str"},{"label":"Monaco","value":"Monaco","type":"str"},{"label":"Mongolia","value":"Mongolia","type":"str"},{"label":"Montenegro ","value":"Montenegro ","type":"str"},{"label":"Morocco","value":"Morocco","type":"str"},{"label":"Mozambique","value":"Mozambique","type":"str"},{"label":"Myanmar","value":"Myanmar","type":"str"},{"label":"Namibia","value":"Namibia","type":"str"},{"label":"Nauru","value":"Nauru","type":"str"},{"label":"Nepal","value":"Nepal","type":"str"},{"label":"Netherlands","value":"Netherlands","type":"str"},{"label":"New Zealand","value":"New Zealand","type":"str"},{"label":"Nicaragua","value":"Nicaragua","type":"str"},{"label":"Niger","value":"Niger","type":"str"},{"label":"Nigeria","value":"Nigeria","type":"str"},{"label":"Niue","value":"Niue","type":"str"},{"label":"Norway","value":"Norway","type":"str"},{"label":"Oman","value":"Oman","type":"str"},{"label":"Pakistan","value":"Pakistan","type":"str"},{"label":"Palau","value":"Palau","type":"str"},{"label":"Panama","value":"Panama","type":"str"},{"label":"Papua New Guinea","value":"Papua New Guinea","type":"str"},{"label":"Paraguay","value":"Paraguay","type":"str"},{"label":"Peru","value":"Peru","type":"str"},{"label":"Philippines","value":"Philippines","type":"str"},{"label":"Poland","value":"Poland","type":"str"},{"label":"Portugal","value":"Portugal","type":"str"},{"label":"Qatar","value":"Qatar","type":"str"},{"label":"Republic of Korea","value":"Republic of Korea","type":"str"},{"label":"Republic of Moldova","value":"Republic of Moldova","type":"str"},{"label":"Romania","value":"Romania","type":"str"},{"label":"Russian Federation","value":"Russian Federation","type":"str"},{"label":"Rwanda","value":"Rwanda","type":"str"},{"label":"Saint Kitts and Nevis","value":"Saint Kitts and Nevis","type":"str"},{"label":"Saint Lucia","value":"Saint Lucia","type":"str"},{"label":"Saint Vincent and the Grenadines","value":"Saint Vincent and the Grenadines","type":"str"},{"label":"Samoa","value":"Samoa","type":"str"},{"label":"San Marino","value":"San Marino","type":"str"},{"label":"Sao Tome and Principe","value":"Sao Tome and Principe","type":"str"},{"label":"Saudi Arabia","value":"Saudi Arabia","type":"str"},{"label":"Senegal","value":"Senegal","type":"str"},{"label":"Serbia","value":"Serbia","type":"str"},{"label":"Seychelles","value":"Seychelles","type":"str"},{"label":"Sierra Leone","value":"Sierra Leone","type":"str"},{"label":"Singapore","value":"Singapore","type":"str"},{"label":"Slovakia","value":"Slovakia","type":"str"},{"label":"Slovenia","value":"Slovenia","type":"str"},{"label":"Solomon Islands","value":"Solomon Islands","type":"str"},{"label":"Somalia","value":"Somalia","type":"str"},{"label":"South Africa","value":"South Africa","type":"str"},{"label":"South Sudan","value":"South Sudan","type":"str"},{"label":"Spain","value":"Spain","type":"str"},{"label":"Sri Lanka","value":"Sri Lanka","type":"str"},{"label":"State of Palestine","value":"State of Palestine","type":"str"},{"label":"Sudan","value":"Sudan","type":"str"},{"label":"Suriname","value":"Suriname","type":"str"},{"label":"Swaziland","value":"Swaziland","type":"str"},{"label":"Sweden","value":"Sweden","type":"str"},{"label":"Switzerland","value":"Switzerland","type":"str"},{"label":"Syrian Arab Republic","value":"Syrian Arab Republic","type":"str"},{"label":"Tajikistan","value":"Tajikistan","type":"str"},{"label":"Thailand","value":"Thailand","type":"str"},{"label":"The former Yugoslav republic of Macedonia","value":"The former Yugoslav republic of Macedonia","type":"str"},{"label":"Timor-Leste","value":"Timor-Leste","type":"str"},{"label":"Togo","value":"Togo","type":"str"},{"label":"Tonga","value":"Tonga","type":"str"},{"label":"Trinidad and Tobago","value":"Trinidad and Tobago","type":"str"},{"label":"Tunisia","value":"Tunisia","type":"str"},{"label":"Turkey","value":"Turkey","type":"str"},{"label":"Turkmenistan","value":"Turkmenistan","type":"str"},{"label":"Tuvalu","value":"Tuvalu","type":"str"},{"label":"Uganda","value":"Uganda","type":"str"},{"label":"Ukraine","value":"Ukraine","type":"str"},{"label":"United Arab Emirates","value":"United Arab Emirates","type":"str"},{"label":"United Kingdom of Great Britain and Northern Ireland","value":"United Kingdom of Great Britain and Northern Ireland","type":"str"},{"label":"United Republic of Tanzania","value":"United Republic of Tanzania","type":"str"},{"label":"United States of America","value":"United States of America","type":"str"},{"label":"Uruguay","value":"Uruguay","type":"str"},{"label":"Uzbekistan","value":"Uzbekistan","type":"str"},{"label":"Vanuatu","value":"Vanuatu","type":"str"},{"label":"Venezuela (Bolivarian Republic of)","value":"Venezuela (Bolivarian Republic of)","type":"str"},{"label":"Viet Nam","value":"Viet Nam","type":"str"},{"label":"Yemen","value":"Yemen","type":"str"},{"label":"Zambia","value":"Zambia","type":"str"},{"label":"Zimbabwe","value":"Zimbabwe","type":"str"}],"payload":"","topic":"","x":100,"y":180,"wires":[["cfadee40.096e28"]],"info":"This user input consists a list of 195 Countries till date."},{"id":"a9c71e34.650d8","type":"ui_dropdown","z":"e3b71738.9e8a8","name":"Status","label":"","tooltip":"","place":"Select Status","group":"6918c602.df679","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"Developed","value":0,"type":"num"},{"label":"Developing","value":0,"type":"num"}],"payload":"","topic":"","x":90,"y":260,"wires":[["8cbea8b8.1d9178"]],"info":"This user input states whether the Country Status is Developing/Developed."},{"id":"cfadee40.096e28","type":"function","z":"e3b71738.9e8a8","name":"select-country","func":"global.set(\"country\",msg.payload);","outputs":1,"noerr":0,"x":220,"y":120,"wires":[["f3122f1f.1d6cd"]],"info":"A function for making Country input a global variable."},{"id":"8cbea8b8.1d9178","type":"function","z":"e3b71738.9e8a8","name":"select-status","func":"global.set(\"status\",msg.payload);","outputs":1,"noerr":0,"x":270,"y":180,"wires":[["f3122f1f.1d6cd"]],"info":"A function for making Country Status input a global variable."},{"id":"9cb6ff06.369f68","type":"ui_toast","z":"e3b71738.9e8a8","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"","name":"Wait","x":690,"y":40,"wires":[[]],"info":"This will notify user that the information has been sent and prediction will be made shortly."},{"id":"70a50004.b26108","type":"function","z":"e3b71738.9e8a8","name":"inform-user","func":"msg.payload=\"Information Sent Successfully! Prediction will appear soon.\";\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":40,"wires":[["9cb6ff06.369f68"]],"info":"A function to inform user about the input recorded."},{"id":"518e001b.993728","type":"ui_form","z":"e3b71738.9e8a8","name":"Life Expectancy","label":"","group":"6918c602.df679","order":3,"width":0,"height":0,"options":[{"label":"Year","value":"year","type":"number","required":true,"rows":null},{"label":"Adult Mortality","value":"adm","type":"number","required":true,"rows":null},{"label":"Infant Deaths","value":"infd","type":"number","required":true,"rows":null},{"label":"Under-five deaths ","value":"undfive","type":"number","required":true,"rows":null},{"label":"Percentage Expenditure","value":"perexp","type":"number","required":true,"rows":null},{"label":"Total Expenditure","value":"totalexp","type":"number","required":true,"rows":null},{"label":"GDP","value":"gdp","type":"number","required":true,"rows":null},{"label":"Population","value":"population","type":"number","required":true,"rows":null},{"label":"Income composition of resources","value":"compres","type":"number","required":true,"rows":null},{"label":"Hepatitis B","value":"hepb","type":"number","required":true,"rows":null},{"label":"Measles ","value":"meas","type":"number","required":true,"rows":null},{"label":"Polio","value":"polio","type":"number","required":true,"rows":null},{"label":"Diphtheria ","value":"dipth","type":"number","required":true,"rows":null},{"label":"HIV/AIDS","value":"hiv","type":"number","required":true,"rows":null},{"label":"Alcohol","value":"alcohol","type":"number","required":true,"rows":null},{"label":"Thinness 5-9 years","value":"thin59","type":"number","required":true,"rows":null},{"label":"Thinness 1-19 years","value":"thin119","type":"number","required":true,"rows":null},{"label":"BMI ","value":"bmi","type":"number","required":true,"rows":null},{"label":"Schooling","value":"schooling","type":"number","required":true,"rows":null}],"formValue":{"year":"","adm":"","infd":"","undfive":"","perexp":"","totalexp":"","gdp":"","population":"","compres":"","hepb":"","meas":"","polio":"","dipth":"","hiv":"","alcohol":"","thin59":"","thin119":"","bmi":"","schooling":""},"payload":"","submit":"predict","cancel":"clear","topic":"","x":120,"y":60,"wires":[["f3122f1f.1d6cd"]],"info":"This Form element includes the pre-requisite details for the AutoAI Model to predict which will be inputted by user. The inputs to the model will be Immunization Factors, Economical Factors, Social Factors, Mortality Factors as follows:\n1) Year\n2) Adult Mortality Rates of both sexes (probability of dying between 15 and 60 years per 1000 population) \n3) Number of Infant Deaths per 1000 population\n4) Under-Five Deaths per 1000 population\n5) Percentage Expenditure on health as a percentage of Gross Domestic Product per capita(%) \n6) Total Expenditure\n7) Income Composition of Resources\n8) GDP\n9) Hepatitis B (HepB) immunization coverage among 1-year-olds (%)\n10) Measles - number of reported cases per 1000 population \n11) Polio\n12) Diphtheria\n13) HIV/AIDS\n14) BMI\n15) Alcohol recorded per capita (15+) consumption (in litres of pure alcohol)\n16) Thinness 1-19 years\n17) Thinness 5-9 years\n18) Schooling\n"},{"id":"df9c9416.c62118","type":"ui_template","z":"e3b71738.9e8a8","group":"656c360.d2735cc","name":"Information","order":1,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>\n<ul type=\"square\"><font size=\"4\">\n <li>Welcome to Life Expectancy Predictor App.</li>\n <li>You can fill in the Form and get the Predicted Life Expectancy of People living in a Country.</li>\n <li>You can also see a Visual Representation depending upon the Prediction after Form is submitted.</li>\n <ul type=\"circle\">\n <li>Red: Critical Life Expectancy.</li>\n <li>Orange: Moderate Life Expectancy.</li>\n <li>Green: Safe Life Expectancy.</li>\n </ul>\n</font></ul>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":330,"y":40,"wires":[[]],"info":"An information node for the user to know what the app does and how it can be used."},{"id":"4a04c40e.a3a884","type":"ui_gauge","z":"e3b71738.9e8a8","name":"Visual Representation","group":"3054d804.999be8","order":2,"width":0,"height":0,"gtype":"gage","title":"","label":"Years","format":"","min":0,"max":"100","colors":["#ec0225","#fab854","#04cc27"],"seg1":"50","seg2":"75","x":660,"y":420,"wires":[],"info":"Visual Representation of Predicted Life Expectancy."}]